﻿using UnityEngine;
using System.Collections;

public class StatOpenBtn : MonoBehaviour {

    bool StatIsOpened = false;

    void OnClick()
    {
        if (!StatIsOpened)
        {
            GameObject.Find("Middle").transform.GetChild(4).gameObject.SetActive(true);
            GameTime.TimeSpeed_Pause();
            StatIsOpened = true;
        }
        else
        {
            GameObject.Find("Middle").transform.GetChild(4).gameObject.SetActive(false);
            GameTime.TimeSpeed_Play();
            StatIsOpened = false;
        }
    }
}
